import java.util.Scanner;


public class FactorialOfN {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        System.out.println(factorial(n));
    }

    public static int factorial(int n) {
        int a = 1;
        if (n == 1) {
            return 1;
        } else {
            a = n * factorial(n - 1);
            return a;
        }
    }
}
